﻿@model ApplicationManageViewModel
<div class="p-4">
	<div class="d-flex justify-content-between">
		<h3>应用管理</h3>
		<form method="get" asp-controller="Manage" asp-action="ApplicationCreate">
			<button class="btn btn-primary">+创建应用</button>
		</form>
	</div>
	<hr>
	<div>
		@foreach (var (u, o) in Model.Applications.Select(x => (x.UserApplication, x.OpenIdApplication)))
		{
			<form method="get" asp-controller="Manage" asp-action="ApplicationEdit">
				<input name="clientId" value="@o.ClientId" hidden>
				<dt>
					应用名称：@o.DisplayName
				</dt>
				<div>创建时间：@u.CreatedDateTime</div>
				<button type="submit" class="btn btn-primary">编辑应用</button>
			</form>
		}
	</div>
</div>
